﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Liju.Common
{
   public static class EncodeHelper
    {
        public static string Base64Encode( string text) // 将字符串编码为 Base64
        {
            return (Convert.ToBase64String(Encoding.Default.GetBytes(text)));
        }
        public static string Base64_Decode(string code) // 将 Base64 解码还原字符串
        {
            return (Encoding.Default.GetString(Convert.FromBase64String(code)));
        }
    }
}
